
 <script th:inline="javascript">
/*<![CDATA[*/	

    function del(event,element){
    	event.preventDefault();
      	bootbox.confirm("你确定要删除吗", function(result) {
    	if(result){
    		var _id = $(element).attr("href").split("_")[0];
    		var _page=$(element).attr("href").split("_")[1];
    		var _viewState = $(element).attr("href").split('_')[2];
    		BOSS.remoteCall('advertisement/adsList/delete',$('#div_advertise_list'),{id:_id,page:_page,viewState:_viewState});
    		}
    	}); 
    }


/*]]>*/
</script>
<table layout:fragment="advertiseList_table" class="table table-striped table-bordered  table-advance table-hover" id="advertise_list" >
	<thead>
		<tr>
			<th>编号</th>
			<th style="width:200px">广告名称</th>
			<th style="width:200px">广告位名称</th>
			<th>媒介类型</th>
			<th>开始日期</th>
			<th>结束日期</th>
			<th>点击次数</th>
			<th>排序</th>
			<th>操作</th>
		</tr>
	</thead>	
	<tbody>
	
		<tr class="odd gradeX" th:each="data : ${advertiseListPage}">
			
			<td th:text="${data.id}"></td>
			<td th:text="${data.advertiseName}"></td>
			
			<td th:text="${data.adPositionName.adPositionName}"></td>
			<td th:text="${data.mediaType.description}"></td>
			<td th:text="${data.startDate}"></td>
			<td th:text="${data.endDate}"></td>
			
			<td th:text="${data.clickCount}"></td>
			<td th:text="${data.sortOrder}"></td>
			
			<td>
				
			    <a href="" th:href="@{'/advertisement/adsList/edit/'+${data.id}}"  class="btn default btn-xs purple" th:attr="id=${'link_edit_'+dataStat.index},name=${'link_edit_'+dataStat.index}" id="Link_attributeEdit" ><i class="fa fa-edit"></i>编辑</a>|
                <a href="#" th:href="${data.id}+'_'+${advertiseListPage.number}+'_'+${viewState}" th:attr="id=${'link_delete_'+dataStat.index},name=${'link_delete_'+dataStat.index}" class="btn default btn-xs purple" onclick="del(event,this);"><i class="fa fa-minus"></i>移除</a>
			</td>		 
		</tr>
		<tr th:if="${advertiseListPage.getNumberOfElements()==0}">
		   <td colspan="7" align="center">未查到任何记录，请放大查询条件试试</td>
		</tr>

 	</tbody>
</table>

<div th:include="page_footer" th:with="viewState=${viewState},url=${'/advertisement/adsList/index'},pageContext=${advertiseListPage}"></div>